/********************************************************/
/*	Copyright (C) 2016 Gong Li Bin			*/
/*	Project:	GlbCloud			*/
/*	Author:		gong_libin			*/
/*	Date:		2012_01_14			*/
/*	File:		MrBloom.h			*/
/********************************************************/

#ifndef _MRBLOOM_H
#define	_MRBLOOM_H

#include "MrFile.h"

#ifdef __i386__
	#define	MR_BLOOM_BASE		536870912
	#define	MR_BLOOM_SIZE		2147483647
#elif __x86_64__
	#define	MR_BLOOM_BASE		536870912
	#define	MR_BLOOM_SIZE		2147483647
#endif

#define	MR_BLOOM_0			0x01
#define	MR_BLOOM_1			0x02
#define	MR_BLOOM_2			0x04
#define	MR_BLOOM_3			0x08
#define	MR_BLOOM_4			0x10
#define	MR_BLOOM_5			0x20
#define	MR_BLOOM_6			0x40
#define	MR_BLOOM_7			0x80

class CMrBloom : public CMrFile
{
public:
	CMrBloom();
	virtual ~CMrBloom();

	void MrBloomClose();
	int MrBloomOpen(char* pszFile);
	int MrBloomCheck(UCHAR* puszBloom, UINT uiLength, bool bProc);
	void MrBloomUpdate(UCHAR* puszBloom, UINT uiLength, bool bProc);

	virtual void MrFileMmapGet(UINT uiOffset, UCHAR* puszLine, UINT uiLength, bool bProc);
	virtual void MrFileMmapPut(UINT uiOffset, UCHAR* puszLine, UINT uiLength, bool bProc);

private:

};

#endif /* _MRBLOOM_H */
